package com.ymttest.database.mapping.fastturnover;

import com.ymttest.database.model.fastturnover.account_config;
import com.ymttest.database.model.fastturnover.account_configExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface account_configMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @SelectProvider(type=account_configSqlProvider.class, method="countByExample")
    int countByExample(account_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @DeleteProvider(type=account_configSqlProvider.class, method="deleteByExample")
    int deleteByExample(account_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @Delete({
        "delete from account_config",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @Insert({
        "insert into account_config (id, seller_id, ",
        "nike_name, rate_type, ",
        "rate, max_loan, operator, ",
        "start_time, end_time, ",
        "add_time, update_time)",
        "values (#{id,jdbcType=BIGINT}, #{seller_id,jdbcType=BIGINT}, ",
        "#{nike_name,jdbcType=VARCHAR}, #{rate_type,jdbcType=INTEGER}, ",
        "#{rate,jdbcType=INTEGER}, #{max_loan,jdbcType=BIT}, #{operator,jdbcType=VARCHAR}, ",
        "#{start_time,jdbcType=TIMESTAMP}, #{end_time,jdbcType=TIMESTAMP}, ",
        "#{add_time,jdbcType=TIMESTAMP}, #{update_time,jdbcType=TIMESTAMP})"
    })
    int insert(account_config record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @InsertProvider(type=account_configSqlProvider.class, method="insertSelective")
    int insertSelective(account_config record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @SelectProvider(type=account_configSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="seller_id", property="seller_id", jdbcType=JdbcType.BIGINT),
        @Result(column="nike_name", property="nike_name", jdbcType=JdbcType.VARCHAR),
        @Result(column="rate_type", property="rate_type", jdbcType=JdbcType.INTEGER),
        @Result(column="rate", property="rate", jdbcType=JdbcType.INTEGER),
        @Result(column="max_loan", property="max_loan", jdbcType=JdbcType.BIT),
        @Result(column="operator", property="operator", jdbcType=JdbcType.VARCHAR),
        @Result(column="start_time", property="start_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="end_time", property="end_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="add_time", property="add_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="update_time", jdbcType=JdbcType.TIMESTAMP)
    })
    List<account_config> selectByExample(account_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @Select({
        "select",
        "id, seller_id, nike_name, rate_type, rate, max_loan, operator, start_time, end_time, ",
        "add_time, update_time",
        "from account_config",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="seller_id", property="seller_id", jdbcType=JdbcType.BIGINT),
        @Result(column="nike_name", property="nike_name", jdbcType=JdbcType.VARCHAR),
        @Result(column="rate_type", property="rate_type", jdbcType=JdbcType.INTEGER),
        @Result(column="rate", property="rate", jdbcType=JdbcType.INTEGER),
        @Result(column="max_loan", property="max_loan", jdbcType=JdbcType.BIT),
        @Result(column="operator", property="operator", jdbcType=JdbcType.VARCHAR),
        @Result(column="start_time", property="start_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="end_time", property="end_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="add_time", property="add_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="update_time", jdbcType=JdbcType.TIMESTAMP)
    })
    account_config selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @UpdateProvider(type=account_configSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") account_config record, @Param("example") account_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @UpdateProvider(type=account_configSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") account_config record, @Param("example") account_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @UpdateProvider(type=account_configSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(account_config record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table account_config
     *
     * @mbggenerated Mon Nov 02 11:18:38 CST 2020
     */
    @Update({
        "update account_config",
        "set seller_id = #{seller_id,jdbcType=BIGINT},",
          "nike_name = #{nike_name,jdbcType=VARCHAR},",
          "rate_type = #{rate_type,jdbcType=INTEGER},",
          "rate = #{rate,jdbcType=INTEGER},",
          "max_loan = #{max_loan,jdbcType=BIT},",
          "operator = #{operator,jdbcType=VARCHAR},",
          "start_time = #{start_time,jdbcType=TIMESTAMP},",
          "end_time = #{end_time,jdbcType=TIMESTAMP},",
          "add_time = #{add_time,jdbcType=TIMESTAMP},",
          "update_time = #{update_time,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(account_config record);
}